package demo3;

//自定义一个泛型类
class Student<E> {
    private E name;
    public E getName() {
        return this.name;
    }
    public void setName(E name) {
        this.name= name;
    }
}

class money extends Student<String> {

}

public class GenericDemo {

    public static void main(String[] args) {
        Student<String> stringStudent = new Student<String>();
        stringStudent.setName("厚积薄发");
        System.out.println(stringStudent.getName());
    }
}
